Summary

A networkable dictionary for use with the <see cref="T:Sandbox.SyncAttribute" /> and <see cref="T:Sandbox.HostSyncAttribute" />. Only changes will be networked instead of sending the whole dictionary every time, so it's more efficient. <br /><para><b>Example usage:</b><code> public class MyComponent : Component { [Sync] public NetDictionary&lt;string,bool&gt; MyBoolTable { get; set; } = new(); <br /> public void SetBoolState( string key, bool state ) { if ( IsProxy ) return; MyBoolTable[key] = state; } } </code></para>

Properties

Count <inheritdoc cref="P:System.Collections.ObjectModel.ObservableDictionary`2.Count" />
Item
Keys <inheritdoc cref="P:System.Collections.ObjectModel.ObservableDictionary`2.Keys" />
Values <inheritdoc cref="P:System.Collections.ObjectModel.ObservableDictionary`2.Values" />

Methods

Add
Clear <inheritdoc cref="M:System.Collections.ObjectModel.ObservableDictionary`2.Clear" />
Contains
ContainsKey
CopyTo
Dispose
GetEnumerator <inheritdoc cref="M:System.Collections.ObjectModel.ObservableDictionary`2.GetEnumerator" />
Remove
TryGetValue
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.